/*
 * Main.java - Copyright May 4, 2012 Z Networks Group, Inc. All rights reserved.
 * Z Networks Group PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.andromeda.skadi.entity;

import com.andromeda.skadi.entity.attribute.AttributeType;
import static com.andromeda.skadi.utils.MapUtils.E;
import static com.andromeda.skadi.utils.MapUtils.M;

/**
 *
 * @author Dickinson Roman Arismendy Torres
 */
public class Main {

    public static final AttributeType stringAttributeType = new AttributeType("String", 1l);
    public static final AttributeType intAttributeType = new AttributeType("Integer", 1l);
    public static final AttributeType dateAttributeType = new AttributeType("Date", 1l);
    public static final AttributeType timeAttributeType = new AttributeType("Time", 1l);
    public static final AttributeType timestampAttributeType = new AttributeType("Timestamp", 1l);
    public static final AttributeType booleanAttributeType = new AttributeType("Boolean", 1l);
    public static final AttributeType decimalAttributeType = new AttributeType("Decimal", 1l);

    public static void main(String[] args) {
        EntityType person = new EntityType("Person", 1L,
                M(E("age", intAttributeType),
                E("name", stringAttributeType),
                E("lastName", stringAttributeType),
                E("married", booleanAttributeType)));
        Entity entity = person.New(E("age", 14), E("name", "Andrea"), E("lastName", "Fernandez"));
        System.out.println(entity.getAttributeValue("name"));
        
    }
}
